import React from 'react'
import { Pagination } from 'antd';


export default function OaPagination(props) {
    let { total, pages, changePage, changePageSize } = props

    const onChangePage = (page, pageSize) => {
        changePage(page)
    }
    const onChangegPageSize = (current, size) => {
        changePageSize(size)
    }

    return (
        <div style={{ marginTop: '20px' }}>
            <Pagination defaultCurrent={1} showSizeChanger pageSize={pages} pageSizeOptions={[5, 10, 20]} total={total} align="center" onChange={onChangePage} onShowSizeChange={onChangegPageSize} />
        </div>

    )
}
